package com.spread.serviceImpl;

import com.spread.beans.User;
import com.spread.dao.UserDAO;
import com.spread.service.UserIService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service(value = "userIService")
public class UserServiceImpl implements UserIService {

    @Autowired
    private UserDAO userDAO;

    @Override
    public String login(User user) {

        User checkUser = userDAO.selectByUserAccountAndPwd(user);
        if (checkUser !=  null) {
            return "登录成功";
        }
        return "登录失败";
    }
}
